package com.company.eos.controller.form.audit;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @author Song, Wei
 * Date: 2022/4/28 13:33
 */
@Data
@Schema(description = "查询审批任务分页列表表单")
public class SearchAuditTaskByPageForm {

    private String applyUserName;

    @Pattern(regexp = "^员工请假$|^会议申请$|^离职申请$", message = "type内容不正确")
    private String type;

    private Integer flowId;

    /**
     * ^待审批$|^已审批$|^已结束$
     */
    private String status;

    @NotNull(message = "page不能为空")
    @Min(value = 1, message = "page不能小于1")
    private Integer page;

    @NotNull(message = "length不能为空")
    @Range(min = 10, max = 100, message = "length必须在10~100之间")
    private Integer length;

}
